import {createRouter, createWebHistory} from "vue-router"
import Edit from "@/components/edit.vue"
import Home from "@/view/home.vue"
const routes=[
	{
		path:"/",
		component:Home,
		children:[{
			path:"a",
			component:Edit
		}]
	},
]
export const router=createRouter({
	routes,
	history:createWebHistory()
})
// const whitelist=[
// 	"/login",
// 	"/reg"
// ]
// router.beforeEach((to, from,next) => {
// 	const store=useStore();
// 	if(!whitelist.includes(to.path)&&store.isLogin===false){
// 		next("/login")
// 	}else{
// 		next()
// 	}
//   })